<script lang="ts" setup>
import { CircleCloseFilled } from "@element-plus/icons-vue"
import { defineProps } from "vue";

defineProps(["content", "type"])
</script>

<template>
  <div class="prompt">
    <div style="color: rgb(255,58,58)">
      <el-icon v-if="type === 'error'">
        <CircleCloseFilled />
      </el-icon>
      <span>{{ content }}</span>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.prompt {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  width: 290px;
  height: 45px;
  border-radius: 50px;
  background-color: rgba(0, 0, 0, 0.75);

  div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;

    span {
      font-family: $textFont;
      margin-left: 20px;
    }
  }
}

:deep(.el-icon) {
  font-size: $font-size-md;
}
</style>
